﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OnlineMealOrdering.Domain.Base;

namespace OnlineMealOrdering.Domain
{
    public class AddressEntity : AuditableEntity
    {
        public bool IsMain { get; set; }//是否是主地址

        public string Address { get; set; }

        public string Contact { get; set; }

        public string TelPhone { get; set; }

        public static AddressEntity Create(string address, string contect, string tel="")
        {
            var add = new AddressEntity();
            add.Address = address;
            add.Contact = contect;
            add.TelPhone = tel;
            return add;
        }

        public void Update(string address, string contect, string tel)
        {
            Address = address;
            Contact = contect;
            TelPhone = tel;
        }
    }
}
